Optimal. Leaf size=61 \[ \frac{2 B \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{d}+\frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 C \sin (c+d x)}{d \sqrt{\cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.106751, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {4064, 3021, 2748, 2641, 2639} \[ \frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 C \sin (c+d x)}{d \sqrt{\cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4064
Rule 3021
Rule 2748
Rule 2641
Rule 2639
Rubi steps
\begin{align*} \int \sqrt{\cos (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \frac{C+B \cos (c+d x)+A \cos ^2(c+d x)}{\cos ^{\frac{3}{2}}(c+d x)} \, dx\\ &=\frac{2 C \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+2 \int \frac{\frac{B}{2}+\frac{1}{2} (A-C) \cos (c+d x)}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 C \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+B \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx+(A-C) \int \sqrt{\cos (c+d x)} \, dx\\ &=\frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 C \sin (c+d x)}{d \sqrt{\cos (c+d x)}}\\ \end{align*}
Mathematica [C] time = 6.25351, size = 759, normalized size = 12.44 \[ -\frac{2 A \csc (c) \cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right ) \text{HypergeometricPFQ}\left (\left \{-\frac{1}{2},-\frac{1}{4}\right \},\left \{\frac{3}{4}\right \},\cos ^2\left (\tan ^{-1}(\tan (c))+d x\right )\right )}{\sqrt{\tan ^2(c)+1} \sqrt{1-\cos \left (\tan ^{-1}(\tan (c))+d x\right )} \sqrt{\cos \left (\tan ^{-1}(\tan (c))+d x\right )+1} \sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}-\frac{\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right )}{\sqrt{\tan ^2(c)+1}}+\frac{2 \cos ^2(c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}{\sin ^2(c)+\cos ^2(c)}}{\sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}\right )}{d (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}+\frac{2 C \csc (c) \cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right ) \text{HypergeometricPFQ}\left (\left \{-\frac{1}{2},-\frac{1}{4}\right \},\left \{\frac{3}{4}\right \},\cos ^2\left (\tan ^{-1}(\tan (c))+d x\right )\right )}{\sqrt{\tan ^2(c)+1} \sqrt{1-\cos \left (\tan ^{-1}(\tan (c))+d x\right )} \sqrt{\cos \left (\tan ^{-1}(\tan (c))+d x\right )+1} \sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}-\frac{\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right )}{\sqrt{\tan ^2(c)+1}}+\frac{2 \cos ^2(c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}{\sin ^2(c)+\cos ^2(c)}}{\sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}\right )}{d (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}-\frac{4 B \csc (c) \cos ^2(c+d x) \sqrt{1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin (c) \left (-\sqrt{\cot ^2(c)+1}\right ) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \text{HypergeometricPFQ}\left (\left \{\frac{1}{4},\frac{1}{2}\right \},\left \{\frac{5}{4}\right \},\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right )}{d \sqrt{\cot ^2(c)+1} (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}+\frac{\cos ^{\frac{5}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac{4 C \sec (c) \sin (d x) \sec (c+d x)}{d}-\frac{2 \csc (c) \sec (c) (A \cos (2 c)+A-2 C)}{d}\right )}{A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 2.326, size = 195, normalized size = 3.2 \begin{align*} 2\,{\frac{A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -C\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}\cos \left ( 1/2\,dx+c/2 \right ) C}{\sin \left ( 1/2\,dx+c/2 \right ) \sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sqrt{\cos \left (d x + c\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sqrt{\cos \left (d x + c\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \sec{\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sqrt{\cos{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sqrt{\cos \left (d x + c\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]